package com.servive.impl;

import com.dao.UserDao;
import com.pojo.User;
import com.servive.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;


    @Override
    @Transactional
    public User getServiceUserById(int id) throws Exception {

        return userDao.getUserById(id);
    }

    @Override
    public int insetServiceUser(User user) {
        return userDao.insetUser(user);
    }

    @Override
    public int delServiceUser(int id) {



        return userDao.delUser(id);
    }


    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
